import request from '@/utils/request'

// 查询招待列表
export function listFinanceEntertain(query) {
  return request({
    url: '/oa/financeEntertain/list',
    method: 'get',
    params: query
  })
}

// 查询招待详细
export function getFinanceEntertain(id) {
  return request({
    url: '/oa/financeEntertain/' + id,
    method: 'get'
  })
}

// 新增招待
export function addFinanceEntertain(data) {
  return request({
    url: '/oa/financeEntertain',
    method: 'post',
    data: data
  })
}

// 修改招待
export function updateFinanceEntertain(data) {
  return request({
    url: '/oa/financeEntertain',
    method: 'put',
    data: data
  })
}

// 删除招待
export function delFinanceEntertain(id) {
  return request({
    url: '/oa/financeEntertain/' + id,
    method: 'delete'
  })
}

//获取没有招待流程的项目信息
export function getProjectList(data) {
  return request({
    url: '/oa/financeEntertain/getProjectList',
    method: 'get',
  })
}

// 通过项目名称查询招待申请
export function queryFinanceEntertainByProjectName(data) {
  return request({
    url: '/oa/financeEntertain/queryByProjectName',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data,
  })
}
